package cn.yunyichina.provider.finance.converter;

import cn.yunyichina.provider.finance.common.Converter;
import cn.yunyichina.provider.finance.entity.BoneOrderBo;

import com.alibaba.fastjson.JSONObject;

public class BoneOrderBoConverter implements Converter<JSONObject, BoneOrderBo> {

	@Override
	public BoneOrderBo convert(JSONObject t) {
		BoneOrderBo boneOrderBo = new BoneOrderBo();
		
		boneOrderBo.setId(t.getString("id"));
		boneOrderBo.setOrderNo(t.getString("order_no"));
		boneOrderBo.setRelationNo(t.getString("diagnosis_order_no"));
		boneOrderBo.setOrgId(t.getString("org_id"));
		boneOrderBo.setOrgCode(t.getString("org_code"));
		boneOrderBo.setOrgName(t.getString("org_name"));
		boneOrderBo.setDeptId(t.getString("dept_id"));
		boneOrderBo.setDeptCode(t.getString("dept_code"));
		boneOrderBo.setDeptName(t.getString("dept_name"));
		boneOrderBo.setOrderStatus(t.getShort("order_status"));
		boneOrderBo.setOrderType(t.getShort("order_type"));
		boneOrderBo.setManageStatus(t.getString("manage_status"));
		boneOrderBo.setUserId(t.getString("user_id"));
		boneOrderBo.setUserName(t.getString("user_name"));
		boneOrderBo.setAmount(t.getInteger("total_amount"));
		boneOrderBo.setProfessorDoctorId(t.getString("professor_doctor_id"));
		boneOrderBo.setProfessorDoctorName(t.getString("professor_doctor_name"));
		boneOrderBo.setProfessorDoctorRecvAmount(t.getInteger("professor_doctor_recv_amount"));
		boneOrderBo.setAppointmentDoctorId(t.getString("appointment_doctor_id"));
		boneOrderBo.setAppointmentDoctorName(t.getString("appointment_doctor_name"));
		boneOrderBo.setAppointmentDoctorRecvAmount(t.getInteger("appointment_doctor_recv_amount"));
		boneOrderBo.setPlatformId(t.getString("platform_id"));
		boneOrderBo.setPlatformCode(t.getString("platform_code"));
		boneOrderBo.setPlatformName(t.getString("platform_name"));
		boneOrderBo.setPlatformServiceFee(t.getInteger("platform_service_fee"));
		boneOrderBo.setSurgeryAccidentFee(t.getInteger("surgery_accident_fee"));
		
		return boneOrderBo;
	}

}
